﻿using Aishow.BLL;
using Aishow.Model.OperResult;
using System;
using System.Reflection;
using System.Threading.Tasks;
using Quartz;

namespace Aishow.WebSite
{
    /// <summary>
    /// 同步视频（状态及封面）工作
    /// </summary>
    public class SyncVideosJob : IJob
    {
        //private readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        /// <summary>
        /// 执行
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public async Task Execute(IJobExecutionContext context)
        {
            VideoManager videoManager = new VideoManager();
            OperResult<int> syncResult = await videoManager.SyncVideos();
            // 日志记录
           // log.Info("已同步"+ syncResult.ReadResult() + "条数据，时间："+ DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        }
    }
}